package transaction;

import java.util.Calendar;
import model.Model;

import person.Employee;
import person.Person;

public class Transaction extends Model{
	
	public Transaction(Person beneficiary, Employee employee, Type type, double amount, Calendar date, String reasonForPayment) {
		super();
		this.beneficiary = beneficiary;
		this.employee = employee;
		this.type = type;
		this.amount = amount;
		this.date = date;
		this.reasonForPayment = reasonForPayment;
	}
	
	public Transaction(long id, Person beneficiary, Employee employee, Type type, double amount, Calendar date, String reasonForPayment) {
		super(id);
		this.beneficiary = beneficiary;
		this.employee = employee;
		this.type = type;
		this.amount = amount;
		this.date = date;
		this.reasonForPayment = reasonForPayment;
	}
	public Person getBeneficiary() {
		return beneficiary;
	}
	public void setBeneficiary(Person beneficiary) {
		this.beneficiary = beneficiary;
	}
	public Employee getEmployee() {
		return employee;
	}
	public void setEmployee(Employee employee) {
		this.employee = employee;
	}
	public Type getType() {
		return type;
	}
	public void setType(Type type) {
		this.type = type;
	}
	public double getAmount() {
		return amount;
	}
	public void setAmount(double amount) {
		this.amount = amount;
	}
	public Calendar getDate() {
		return date;
	}
	public void setDate(Calendar date) {
		this.date = date;
	}
	public String getReasonForPayment() {
		return reasonForPayment;
	}
	public void setReasonForPayment(String reasonForPayment) {
		this.reasonForPayment = reasonForPayment;
	}
	public enum Type{
	PURCHASE,
	RENT,
	SALARIES_PAYMENT,
	SALE,
	PAYMENT_FROM_CUSTOMER}
	private Person beneficiary;
	private Employee employee;
	private Type type;
	private double amount;
	private Calendar date;
	private String reasonForPayment;
}
